<%--
  Created by IntelliJ IDEA.
  Author: Deng PengFei
  Date: 2021/8/14
  Time: 16:30
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>任务书管理界面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <%--引入LayUI--%>
    <link href="../layui/css/layui.css" rel="stylesheet">
    <script src="../layui/layui.js"></script>
    <script src="../js/jquery-3.1.0.js"></script>
    <script src="../js/FileSaver.js"></script>
    <script src="../js/wordexport.js"></script>

    <style>

        body {
            background-color: #eeeeee;
        }

        .layui-row {
            padding: 10px;
            margin: 10px;
            background-color: white;
            border-radius: 5px;
        }

        .left {
            width: 20%;
            padding: 5px;
            text-align: right;
        }

        .right {
            width: 30%;
            padding: 5px;
        }

        .layui-table-cell {
            height: 36px;
            line-height: 36px;
        }

        .layui-textarea {
            height: 150px;
        }

        .detail-left {
            text-align: right;
        }


    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">

    <%--面包屑导航--%>
    <div class="layui-row">
            <span class="layui-breadcrumb">
             <a href="admin.jsp">首页</a><a><cite>任务书管理界面</cite></a>
            </span>
    </div>


    <%--老师课题盒子--%>
    <div class="layui-row">
        <%--老师课题信息表格--%>
        <table class="layui-hide" id="assignment-table" lay-filter="assignment-table"></table>

    </div>


</div>
</body>

<%--头部工具栏--%>
<div id="assignment-table-toolbar" style="display: none">
    <div class="test-table-reload-btn">

        <div class="layui-inline" style="border: #009f95 solid 1px">
            <label for="queryKey"></label>
            <input class="layui-input" id="queryKey" autocomplete="off" placeholder="工号/姓名/课题名称">
        </div>
        <a class="layui-btn layui-btn-primary layui-border-green" lay-event="query">搜 索</a> <%--按字段查询--%>
        <a class="layui-btn layui-btn-primary layui-border-green" lay-event="queryAll">全部信息</a> <%--按字段查询--%>
        <div class="layui-inline" style="border: #009f95 solid 1px">
            <label for="major1"></label>
            <select id="major1" lay-verify="">
                <option value="">--选择所属组织--</option>
                <option value="010">测试专业</option>
                <option value="021">测试专业</option>
                <option value="0571">测试时</option>
                <option value="0571">测试</option>
                <option value="0571">测试</option>
                <option value="0571">测试专业</option>
                <option value="0571">测试专业</option>
            </select>
        </div>
        <div class="layui-inline" style="border: #009f95 solid 1px">
            <label for="reportState"></label>
            <select id="reportState" lay-verify="">
                <option value="">--选择所属状态--</option>
                <option value="未提交">未提交</option>
                <option value="审核中">审核中</option>
                <option value="已完成">已完成</option>
            </select>
        </div>

      <%--  <div class="layui-inline" style="float: right;line-height: 40px">
            <i class="layui-icon layui-icon-tips" style="color: #009688;font-size: 20px"></i> 操作按钮说明：
            <i class="layui-icon  layui-icon-edit" style="color: #009688;font-size: 20px"></i>下达任务书
            <i class="layui-icon layui-icon-search" style="color: #009688;font-size: 20px"></i>任务书详情
            <i class="layui-icon layui-icon-export" style="color: #009688;font-size: 20px"></i>导向任务书word文件
        </div>--%>
    </div>
</div>

<%--审核--%>
<div id="msg-table-tool" style="display: none">
    <button class="layui-btn layui-btn-radius  layui-btn-primary layui-border-green layui-btn-sm" lay-event="check">
        审核
    </button>
</div>


<%--课题详情--%>
<div id="task-table-tool" style="display: none">
    <button class="layui-btn layui-btn-radius  layui-btn-primary layui-border-blue layui-btn-sm" lay-event="taskDetail">
        课题详情
    </button>
</div>


<%--任务书操作--%>
<div id="assignment-table-tool" style="display: none">
    <div class="layui-btn-group">
        <button class="layui-btn layui-btn-primary layui-border-green layui-btn-sm" title="任务书详情"
                lay-event="query-assignment">
            <i class="layui-icon layui-icon-search"></i>
        </button>
        <button class="layui-btn layui-btn-primary layui-border-green layui-btn-sm" title="导向任务书word文件"
                lay-event="upload-assignment-file">
            <i class="layui-icon layui-icon-export"></i>
        </button>
    </div>
</div>


<%--课题详情模板--%>
<div class="layui-row" id="task-detail" style="display: none">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <td colspan="4"><h2>学生课题详情内容</h2></td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="left">编号:</td>
            <td class="right" id="task-id" colspan="3"></td>
        </tr>
        <tr>
            <td class="left">学号:</td>
            <td class="right" id="task-sno"></td>
            <td class="left">姓名:</td>
            <td class="right" id="task-sname"></td>
        </tr>
        <tr>
            <td class="left">指导老师</td>
            <td class="right" id="task-tname"></td>
            <td class="left">指导老师工号</td>
            <td class="right" id="task-tno"></td>

        </tr>
        <tr>
            <td class="left">所属学院:</td>
            <td class="right" id="task-college"></td>
            <td class="left">所属专业:</td>
            <td class="right" id="task-major"></td>
        </tr>
        <tr>
            <td class="left">标题:</td>
            <td class="right" id="task-title"></td>
            <td class="left">题目来源:</td>
            <td class="right" id="task-from"></td>
        </tr>
        <tr>
            <td class="left">题目类别:</td>
            <td class="right" id="task-category"></td>
            <td class="left">题目性质:</td>
            <td class="right" id="task-nature"></td>
        </tr>
        <tr>
            <td class="left">课题简介:</td>
            <td class="right" colspan="3" id="task-intr"></td>
        </tr>
        </tbody>
    </table>
</div>


<%--查看任务书详情的盒子--%>
<div class="layui-row" id="showAssDetail" style="display: none">
    <div class="layui-col-lg12">
        <div class="layui-fluid">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 20px;padding: 10px;">
                    <strong style="color: red;">学生任务书详情</strong>
                </div>
                <div class="layui-card-body" style="padding: 15px;">

                    <!--指导老师-->
                    <div class="layui-form-item" id="assDetailTable">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <td>
                                    论文编号：<span id="bh"></span>
                                </td>
                                <td style="text-align: center">
                                    <h3>
                                        <span id="table-sName"></span>的任务书详情
                                    </h3>
                                </td>
                            </tr>

                            <!-- 学生基本信息 -->
                            <tr>
                                <td colspan="2">
                                    <blockquote class="layui-elem-quote">
                                        <h3>
                                            <strong>
                                                <span class="layui-badge-dot"></span> 基本信息
                                            </strong>
                                        </h3>
                                    </blockquote>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <div class="layui-col-lg12" style="font-size: 16px;margin-top: 20px;">
                                        <div class="layui-col-lg2">
                                            <strong>学生姓名:</strong>
                                            <span id="sName-ass-detail"></span>
                                        </div>
                                        <div class="layui-col-lg3">
                                            <strong>学号:</strong>
                                            <span id="sNO-ass-detail"></span>
                                        </div>
                                        <div class="layui-col-lg3">
                                            <strong>专业:</strong>
                                            <span id="major-ass-detail"></span>
                                        </div>
                                        <div class="layui-col-lg4">
                                            <strong>课题名称:</strong>
                                            <span id="title-ass-detail"></span>
                                        </div>
                                    </div>
                                </td>
                            </tr>


                            <tr>
                                <td colspan="2">
                                    <blockquote class="layui-elem-quote">
                                        <h3>
                                            <strong>
                                                <span class="layui-badge-dot"></span>
                                                任务书详细信息
                                            </strong>
                                        </h3>
                                    </blockquote>
                                </td>
                            </tr>
                            <tr>
                                <th style="text-align: center;width: 250px">类目</th>
                                <th style="text-align: center;">详情</th>
                            </tr>
                            </thead>
                            <tbody>

                            <!--起止日期-->
                            <tr>
                                <td class="detail-left">任务书起止日期</td>
                                <td><span style="color: red" id="start-end-ass"></span></td>
                            </tr>

                            <!--毕业设计的要求和内容(包括原始数据、技术要求、工作要求)：-->
                            <tr>
                                <td class="detail-left">一、毕业设计的要求和内容(包括原始数据、技术要求、工作要求)：</td>
                                <td><span id="paper-request"></span></td>
                            </tr>


                            <!--二、毕业设计图纸内容及张数：-->
                            <tr>
                                <td class="detail-left">二、毕业设计图纸内容及张数：</td>
                                <td><span id="paper-sum"></span></td>
                            </tr>


                            <!--三、毕业设计实物内容及要求：：-->
                            <tr>
                                <td class="detail-left">三、毕业设计实物内容及要求：</td>
                                <td><span id="paper-entity"></span></td>
                            </tr>

                            <!--主要参考资料-->
                            <tr>
                                <td class="detail-left">主要参考资料</td>
                                <td><span id="datum"></span></td>
                            </tr>
                            <!-- 执行任务书时间-->

                            <tr>
                                <td class="detail-left">执行任务书时间：</td>
                                <td><span id="execute-time"></span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">完成毕业设计时间：</td>
                                <td><span id="paper-end-time"></span></td>
                            </tr>

                            <!--四、毕业设计进度计划 ：-->
                            <tr>
                                <td colspan="2">
                                    <blockquote class="layui-elem-quote">
                                        <h3>
                                            <strong>
                                                <span class="layui-badge-dot"></span>
                                                毕业设计各阶段计划
                                            </strong>
                                        </h3>
                                    </blockquote>
                                </td>
                            </tr>

                            <tr>
                                <td class="detail-left">各阶段工作内容1：</td>
                                <td><span id="stage1">无工作内容</span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">起止日期1：</td>
                                <td><span id="stage1-time">----</span></td>
                            </tr>


                            <tr>
                                <td class="detail-left">各阶段工作内容2：</td>
                                <td><span id="stage2">无工作内容</span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">起止日期2：</td>
                                <td><span id="stage2-time">----</span></td>
                            </tr>

                            <tr>
                                <td class="detail-left">各阶段工作内容3：</td>
                                <td><span id="stage3">无工作内容</span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">起止日期3：</td>
                                <td><span id="stage3-time">----</span></td>
                            </tr>


                            <tr>
                                <td class="detail-left">各阶段工作内容4：</td>
                                <td><span id="stage4">无工作内容</span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">起止日期4：</td>
                                <td><span id="stage4-time">----</span></td>
                            </tr>


                            <tr>
                                <td class="detail-left">各阶段工作内容5：</td>
                                <td><span id="stage5">无工作内容</span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">起止日期5：</td>
                                <td><span id="stage5-time">----</span></td>
                            </tr>
                            </tbody>

                            <tfoot>
                            <tr>
                                <td colspan="2">
                                    <blockquote class="layui-elem-quote">
                                        <h3>
                                            <strong>
                                                <span class="layui-badge-dot"></span> 任务书审核意见：
                                            </strong>
                                        </h3>
                                    </blockquote>
                                </td>
                            </tr>
                            <tr>
                                <td class="detail-left">审核结果:</td>
                                <td><span id="detail-isPass"> --- </span></td>
                            </tr>
                            <tr>
                                <td class="detail-left">审核意见:</td>
                                <td><span id="detail-opinion">暂时没有审核意见，请留意是否审核完毕！</span></td>
                            </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<%--审核任务书表单--%>
<div class="layui-row" id="CheckAssBox" style="display: none">
    <div class="layui-col-lg12">
        <div class="layui-fluid">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 20px;padding: 10px;">
                    <strong style="color: red;">学生任务书详情审核</strong>
                </div>
                <div class="layui-card-body" style="padding: 15px;">

                    <!--指导老师-->
                    <div class="layui-form-item" id="assDetailCheck">

                    </div>

                    <div class="layui-form-item">
                        <label for="check-opinion"></label>
                        <textarea id="check-opinion" placeholder="输入审核意见" class="layui-textarea"
                                  lay-verify="required"></textarea>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-form-item" style="text-align: center">
                            <button class="layui-btn layui-btn-primary layui-border-green layui-btn-radius"
                                    id="check-pass">
                                <i class="layui-icon layui-icon-ok-circle" style="font-size: 20px"></i> 通过
                            </button>
                            <button class="layui-btn layui-btn-primary layui-border-red layui-btn-radius"
                                    id="check-no-pass">
                                <i class="layui-icon layui-icon-close-fill" style="font-size: 20px;"></i> 不通过
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<%--下达任务书模板--%>
<div class="layui-row" id="add-assignment-book" style="display: none">
    <!-- 任务书表单 -->
    <div class="layui-col-lg12">
        <div class="layui-fluid">
            <div class="layui-card">
                <div class="layui-card-header" style="font-size: 20px;padding: 10px;">
                    <strong>给学生下达任务书(其中毕业设计进度计划选填，
                        <span style="color: red;">其它(带红点)为必填项</span>)</strong>
                </div>
                <div class="layui-card-body" style="padding: 15px;">
                    <form class="layui-form" action="" method="post">
                        <div class="layui-form-item">
                            <blockquote class="layui-elem-quote">
                                <span class="layui-badge-dot"></span>
                                学生详细信息
                            </blockquote>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-col-lg12" style="font-size: 16px;margin-top: 20px;">
                                <div class="layui-col-lg3">
                                    <strong> <label for="sName">学生姓名:</label></strong>
                                    <input readonly name="sName" type="text" id="sName" class="layui-input">
                                    <input readonly name="college" type="hidden" id="college" class="layui-input">
                                </div>
                                <div class="layui-col-lg3">
                                    <strong> <label for="sNO">学号:</label></strong>
                                    <input readonly name="SNO" type="text" id="sNO" class="layui-input">
                                </div>
                                <div class="layui-col-lg3">
                                    <strong> <label for="major">专业:</label></strong>
                                    <input readonly name="major" type="text" id="major" class="layui-input">
                                </div>
                                <div class="layui-col-lg3">
                                    <strong><label for="title">课题名称:</label></strong>
                                    <input readonly name="title" type="text" id="title" class="layui-input">
                                </div>
                            </div>
                            <!-- 起止日期 -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    任务书起止日期
                                </blockquote>
                            </div>
                            <div class="layui-form-item">

                                <label class="layui-form-label" for="myDate1">起止日期：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input " id="myDate1" name="myDate1"
                                           placeholder=" 选择起止日期 " lay-verify="required">
                                </div>
                            </div>

                            <!-- 一、毕业设计的要求和内容(包括原始数据、技术要求、工作要求)： -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    一、毕业设计的要求和内容(包括原始数据、技术要求、工作要求)：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text1">
                                    一、毕业设计的要求和内容(包括原始数据、技术要求、工作要求)：
                                </label>
                                <div class="layui-input-block">
                                <textarea id="text1" name="text1" placeholder="输入毕业设计的要求和内容(包括原始数据、技术要求、工作要求)"
                                          class="layui-textarea" lay-verify="required"></textarea>
                                </div>
                            </div>

                            <!-- 二、毕业设计图纸内容及张数： -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    二、毕业设计图纸内容及张数：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text2">二、毕业设计图纸内容及张数：</label>
                                <div class="layui-input-block">
                                <textarea id="text2" name="text2" placeholder="输入毕业设计图纸内容及张数" class="layui-textarea"
                                          lay-verify="required"></textarea>
                                </div>
                            </div>

                            <!-- 三、毕业设计实物内容及要求： -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    三、毕业设计实物内容及要求：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text3">三、毕业设计实物内容及要求：</label>
                                <div class="layui-input-block">
                                <textarea id="text3" name="text3" placeholder="毕业设计实物内容及要求" class="layui-textarea"
                                          lay-verify="required"></textarea>
                                </div>
                            </div>


                            <!-- 四、毕业设计进度计划 -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    四、毕业设计进度计划
                                </blockquote>
                            </div>
                            <!-- 各阶段工作内容1： -->
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text4">各阶段工作内容1：</label>
                                <div class="layui-input-block">
                                <textarea id="text4" name="text4" placeholder="各阶段工作内容1"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate2">起止日期1：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate2" name="myDate2"
                                           placeholder=" 选择各阶段工作内容1起止日期 ">
                                </div>
                            </div>

                            <!-- 各阶段工作内容2： -->
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text5">各阶段工作内容2：</label>
                                <div class="layui-input-block">
                                <textarea id="text5" name="text5" placeholder="各阶段工作内容2"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate3">起止日期2：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate3" name="myDate3"
                                           placeholder=" 选择各阶段工作内容2起止日期 ">
                                </div>
                            </div>

                            <!-- 各阶段工作内容3： -->
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text6">各阶段工作内容3：</label>
                                <div class="layui-input-block">
                                <textarea id="text6" name="text6" placeholder="阶段工作内容3"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate4">起止日期3：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate4" name="myDate4"
                                           placeholder=" 选择各阶段工作内容3起止日期 ">

                                </div>
                            </div>

                            <!-- 各阶段工作内容4： -->
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text7">各阶段工作内容4：</label>
                                <div class="layui-input-block">
                                <textarea id="text7" name="text7" placeholder="阶段工作内容4"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate5">起止日期4：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate5" name="myDate5"
                                           placeholder=" 选择各阶段工作内容4起止日期 ">
                                </div>
                            </div>

                            <!-- 各阶段工作内容5： -->
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text8">各阶段工作内容5：</label>
                                <div class="layui-input-block">
                                <textarea id="text8" name="text8" placeholder="各阶段工作内容5"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate6">起止日期5：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate6" name="myDate6"
                                           placeholder=" 选择各阶段工作内容5起止日期 ">
                                </div>
                            </div>

                            <!--五、主要参考资料：  -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    五、主要参考资料：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="text9"></label>
                                <div class="layui-input-block">
                                <textarea id="text9" name="text9" placeholder="输入主要参考资料"
                                          class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <!-- 执行任务书时间： -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    执行任务书时间：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate7">执行任务书时间：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate7" name="myDate7"
                                           placeholder=" 选择执行任务书起止日期" lay-verify="required">
                                </div>
                            </div>

                            <!--完成毕业设计时间：  -->
                            <div class="layui-form-item">
                                <blockquote class="layui-elem-quote">
                                    <span class="layui-badge-dot"></span>
                                    完成毕业设计时间：
                                </blockquote>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label" for="myDate8">完成毕业设计时间：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="myDate8" name="myDate8"
                                           placeholder="选择完成毕业设计起止日期" lay-verify="required">
                                </div>
                            </div>

                            <%--提交按钮--%>
                            <div class="layui-form-item layui-layout-admin">
                                <div class="layui-input-block">
                                    <button class="layui-btn">保存</button>
                                    <button class="layui-btn" lay-submit
                                            lay-filter="add-assignment-btn">立即提交
                                    </button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    let USERNAME;
    $(function () {
        USERNAME = '${sessionScope.userName}';
    });
</script>
<script src="js/common.js"></script>
<script src="js/assignmentBook.js"></script>


</html>
